﻿@using FikriKibar.Globalization
@using FikriKibar.UI.WebCommon.Helpers
@using FikriKibar.Entities.Composite.FileModels
@model AddModel
@{
    ViewBag.Title = Resources.NewRecord;
    Layout = "~/Views/Shared/ContentLayout.cshtml";
}

<div class="container-fluid">
    <div class="row">
        <div class="col-lg-12">
            <h1 class="page-header">@Resources.FileManagement</h1>
        </div>
    </div>
    <div class="row">
        <div class="col-lg-12">
            <div class="panel panel-default">
                <div class="panel-heading">
                    @Resources.NewRecord
                </div>
                <div class="panel-body">
                    @using (Html.BeginForm("Add", "File", FormMethod.Post, new { @role = "form" }))
                    {
                        <div class="form-group">
                            <label class="control-label" for="SelectedKeywordIds">@Resources.Keywords</label>
                            <div>
                                @Html.FikriKibarListBoxFor(m => m.SelectedKeywordIds, new SelectList(Model.KeywordList, "KeywordId", "KeywordName"), new { @class = "form-control select2 SelectedKeywordIds", @multiple = "multiple" })
                                @Html.ValidationMessageFor(m => m.SelectedKeywordIds)
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label" for="File_FileList">@Resources.File</label>
                            @Html.FikriKibarFileFor(m => m.FileList, new { @class = "form-control", @multiple = "multiple" })
                            @Html.ValidationMessageFor(m => m.FileList)
                        </div>                       
                        <button class="btn btn-primary"><i class="fa fa-save"></i>&nbsp;@Resources.Save</button>
                    }
                </div>
            </div>
            <div class="row">
                <div class="col-lg-12 text-center">
                    @Html.FikriKibarAlertFor(m => m.Message, "div", Model.Message, new { @class = "alert alert-danger" })
                </div>
            </div>
        </div>
    </div>
</div>
